package com.goldenautumn.prefabricate.business.service

import com.goldenautumn.prefabricate.business.entity.AddressDetailsResp
import com.goldenautumn.prefabricate.business.entity.AddressInfoVo
import com.goldenautumn.prefabricate.business.entity.AddressResp
import com.goldenautumn.prefabricate.business.entity.ImageModelResp
import com.goldenautumn.prefabricate.business.entity.LanguageInfo
import com.goldenautumn.prefabricate.business.entity.LoginParams
import com.goldenautumn.prefabricate.business.entity.LoginReqResult
import com.goldenautumn.prefabricate.business.entity.PaymentMethodVo
import com.goldenautumn.prefabricate.business.entity.RegionTreeVo
import com.goldenautumn.prefabricate.business.entity.UserInfoReqResult
import com.goldenautumn.prefabricate.utils.Constants.BASE_URL
import okhttp3.MultipartBody
import qncx.external.common.room.table.UserInfo
import retrofit2.http.Body
import retrofit2.http.FieldMap
import retrofit2.http.FormUrlEncoded
import retrofit2.http.GET
import retrofit2.http.Multipart
import retrofit2.http.POST
import retrofit2.http.Part
import retrofit2.http.QueryMap

interface UserService {

    /***
     * 登录
     * @return
     */
    @FormUrlEncoded
    @POST("$BASE_URL")
    suspend fun onLogin(@QueryMap map:HashMap<String,Any>,@FieldMap body:HashMap<String,Any>): LoginReqResult

    /***
     * 微信登录
     * @return
     */
    @GET("$BASE_URL")
    suspend fun onWeChatLogin(@QueryMap map:HashMap<String,Any>): LoginReqResult

    /***
     * 获取验证码
     * @return
     */
    @FormUrlEncoded
    @POST("http://api.gwdrugs.com/index.php")
    suspend fun onSend(@QueryMap map:HashMap<String,Any>,@FieldMap body:HashMap<String,Any>): Any

    /***
     * 获取用户信息
     * @return
     */
    @GET("$BASE_URL")
    suspend fun getUserInfo(@QueryMap map:HashMap<String,Any>): UserInfoReqResult

    /***
     * 获取地址树
     * @return
     */
    @GET("$BASE_URL")
    suspend fun getRegionTree(@QueryMap map:HashMap<String,Any>): List<RegionTreeVo>

    /***
     * 获取地址列表
     * @return
     */
    @GET("$BASE_URL")
    suspend fun getAddressList(@QueryMap map:HashMap<String,Any>): AddressResp

    /***
     * 创建地址
     * @return
     */
    @FormUrlEncoded
    @POST("$BASE_URL")
    suspend fun onCreateAddress(@QueryMap map:HashMap<String,Any>,@FieldMap body:HashMap<String,Any>): Any

    /***
     * 更新地址
     * @return
     */
    @FormUrlEncoded
    @POST("$BASE_URL")
    suspend fun onUpdateAddress(@QueryMap map:HashMap<String,Any>,@FieldMap body:HashMap<String,Any>): Any

    /***
     * 删除地址
     * @return
     */
    @GET("$BASE_URL")
    suspend fun onDeleteAddress(@QueryMap map:HashMap<String,Any>): Any

    /***
     * 设置默认地址
     * @return
     */
    @GET("$BASE_URL")
    suspend fun onDefaultAddress(@QueryMap map:HashMap<String,Any>): Any

    /***
     * 地址详情
     * @return
     */
    @GET("$BASE_URL")
    suspend fun onAddressDetails(@QueryMap map:HashMap<String,Any>): AddressDetailsResp

    /***
     * 支付类型
     * @return
     */
    @GET("$BASE_URL")
    suspend fun payType(@QueryMap map:HashMap<String,Any>): Any

    /***
     * 文件上传
     * @return
     */
    @Multipart
    @POST("$BASE_URL")
    suspend fun updateImage(@QueryMap map:HashMap<String,Any>,@Part img: MultipartBody.Part): ImageModelResp

    /***
     * 更新用户信息
     * @return
     */
    @FormUrlEncoded
    @POST("$BASE_URL")
    suspend fun updateInfo(@QueryMap map:HashMap<String,Any>,@FieldMap body:HashMap<String,Any>): Any

    /***
     * 绑定手机号
     * @return
     */
    @FormUrlEncoded
    @POST("$BASE_URL")
    suspend fun bindPhone(@QueryMap map:HashMap<String,Any>,@FieldMap body:HashMap<String,Any>): Any

    /***
     * 微信绑定
     * @return
     */
    @GET("$BASE_URL")
    suspend fun bindWechat(@QueryMap map:HashMap<String,Any>): LoginReqResult

    /***
     * 获取语言类型
     * @return
     */
    @GET("$BASE_URL")
    suspend fun getLanguage(@QueryMap map:HashMap<String,Any>): List<LanguageInfo>


}